home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr48 / 386p_200.zip / 386MOUSE.INC < prev    next >
Text File  |  1994-08-22  |  4KB  |  106 lines

  1. ; MOUSE HANDLING CODE
  2. ; includes a "basic" mouse driver for the real-mode-int33h
  3. ; and the mouse specific XID code.
  4.  
  5. ; default microsoft mouse
  6. MAIN_MOUSE  =0       
  7. STICK_MOUSE =1
  8. KEYB_MOUSE  =2
  9. EXTRA_MOUSE =3
  10.        
  11.        ; MOUSE DATA TABLE BEGINS HERE
  12. extrn _MouseName:dword ;4  
  13. ; pointers to asciiz strings containing the mouse names     
  14.  
  15.        ; coordinate ranges
  16. extrn _MouseX1:dword ;4 
  17. ; min. x
  18. extrn _MouseX2:dword ;4 
  19. ; max. x
  20. extrn _MouseY1:dword ;4 
  21. ; min. y
  22. extrn _MouseY2:dword ;4 
  23. ; max. y
  24. extrn _MouseZ1:dword ;4 
  25. ; min. z
  26. extrn _MouseZ2:dword ;4 
  27. ; max. z
  28.        ; N.B. angle ranges are always between 0..360
  29.        
  30.         ; mouse stepping sensitivity
  31.         ; (controls ballistic/stepping if supported by driver)
  32.         ; they can range between 0 (slowest) to 100 (fastest)
  33.         ; and they are just pseudo-indexes 
  34.         ; the driver uses together with the minimum and maximum coords
  35.         ; to calculate the actual sensitivity
  36. extrn _MouseMX:dword ;4
  37. extrn _MouseMY:dword ;4        
  38. extrn _MouseMZ:dword ;4
  39.         ; mouse coords  
  40.                       ; "low"        "high"
  41. extrn _MouseX:dword ;4  
  42. ; left     to right
  43. extrn _MouseY:dword ;4  
  44. ; up       to down
  45. extrn _MouseZ:dword ;4  
  46. ; backward to forward
  47. extrn _AngXY:dword ;4  
  48. ; right   to up
  49. extrn _AngZY:dword ;4  
  50. ; forward to up     
  51. extrn _AngXZ:dword ;4  
  52. ; right   to forward
  53. extrn _Buttons:dword ;4  
  54. ; Mouse button flags
  55.                ; meaning of _Buttons
  56.                ; bit0 = button 0
  57.                ; bit1 = button 1
  58.                ; bit2 = button 3
  59.                ; ...
  60.                ; bitN = button N
  61.                ; YEAH! This baby can support up to 32 buttons
  62.                ; but usually a mouse will have 2..3 buttons
  63.                ; (duplicate the button3 function on the keyboard 
  64.                ;  if you wanna be safe)
  65.                ; If you duplicate button functions on the keyboard
  66.                ; you don't have to check the existence of buttons.
  67.                ; Anyway, if you own one of those weird mouse-with-keypad
  68.                ; you can fully use it once you get a XID driver.
  69. ; MOUSE DATA TABLE ENDS HERE               
  70.  
  71. extrn _MouseReset:near
  72.         ; in: esi = mouse device id
  73.         ; out:
  74.         ;    if      eax == 00000h then mouse not installed
  75.         ;    else if eax == 0FFFFh then
  76.         ;             mouse installed
  77.         ;             mouse hidden & positioned on center of screen
  78.         ;             (actually to the center of the x-y range set into
  79.         ;              the mouse data table)
  80.         ;             coordinates not supported are set to 0
  81.         ;             angles not supported are set to -1
  82.         ;             the supported ones are initially set to zero
  83.         
  84. extrn _MouseRead:near
  85.         ; in:
  86.         ; esi = mouse device index (0..3)
  87.         ; out:
  88.         ;      _MouseX,Y,Z _AngXY,ZY,XZ _Buttons 
  89.         ;      relative to the selected mouse device set according to the
  90.         ;      current status
  91.         
  92. extrn _MouseWrite:near
  93.         ; in: esi= mouse device index
  94.         ; out: mouse status set according to the values in the mouse data table
  95.         
  96. extrn _MouseRange:near
  97.         ; in: esi= mouse device index
  98.         ; out: mouse movement range and sensitivity set according
  99.         ;      to the values in the mouse data tables
  100.         
  101. extrn _MouseSetup:near
  102.         ; in: esi =mouse device index
  103.         ; out: mouse set up to new sensitivity and other "internal settings"
  104.         ;      values specific to this device
  105.                 
  106.